package com.project.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.project.bean.JournalBean;
import com.project.service.IJournalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDate;

@RestController
@RequestMapping("journal")
public class JournalController {
    @Autowired
    private IJournalService service;
@RequestMapping("findByItem")
    public Page<JournalBean> findByItem(Integer pageNo, @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate startDate,@DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate endDate){
        return service.findByItem(pageNo,startDate,endDate);
    }
}
